package com.itboye.eweilisten.util.widget;

import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AnimationUtils;
import android.widget.PopupWindow;

import com.itboye.eweilisten.R;

/**
 * Created by itboye on 2017/3/11.
 */

public class PopupWindows extends PopupWindow {

    public PopupWindows(Context mContext, View parent, View fin) {

        // View view = View.inflate(mContext, R.item_addppuwindow.add_popup_dialog, null);
        fin.startAnimation(AnimationUtils.loadAnimation(mContext,
                R.anim.fade_ins));

//		RelativeLayout ll_popup = (RelativeLayout) fin
//				.findViewById(R.id.ralyoutupdate);
//		ll_popup.startAnimation(AnimationUtils.loadAnimation(mContext,
//				R.anim.push_bottom_in_2));

        setWidth(ViewGroup.LayoutParams.FILL_PARENT);
        setHeight(ViewGroup.LayoutParams.FILL_PARENT);
        setBackgroundDrawable(new BitmapDrawable());
        setFocusable(true);
        setOutsideTouchable(true);
        setContentView(fin);
        showAtLocation(parent, Gravity.BOTTOM, 0, 0);
        this.setAnimationStyle(R.style.AnimationPreview);

    }

}
